package com.xiaoluyy.demo.bootstrap;

import com.xiaoluyy.common.log.LogFactory;
import com.xiaoluyy.common.log.ILog;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.*;

@Configuration
@ComponentScan(basePackages= "com.xiaoluyy.demo")
@EnableAspectJAutoProxy(proxyTargetClass=true)
public class ServerApplication {

    private static final ILog LOG = LogFactory.getLog(ServerApplication.class);


    public static void main(String[] args) {
        long b = System.currentTimeMillis();
    	//Spring启动时，会自动触发ThriftService启动
        ApplicationContext context =
                new AnnotationConfigApplicationContext(ServerApplication.class);
        long e = System.currentTimeMillis();
       // LOG.info("ServerApplication started with slf4j & logback.");
        LOG.info("ServerApplication started successfully in "+(e-b)+"ms.");
    }
}